package tmp

import (
	"github.com/gin-gonic/gin"
	"go-api-template/api/http"
	"go-api-template/api/ws/front"
	"go-api-template/service"
)

type PreCheckReq struct {
}

type PreCheckResp struct {
}

func (req *PreCheckReq) Request(ctx *gin.Context, s *service.Service) (http.Resp, error) {
	return req.Do(ctx, s)
}

func (req *PreCheckReq) Do(ctx *gin.Context, s *service.Service) (resp http.Resp, err error) {
	var data PreCheckResp

	resp.SetData(data)
	return
}

type NormalCrossDomainReq struct {
}

type NormalCrossDomainResp struct {
}

func (req *NormalCrossDomainReq) Request(ctx *gin.Context, s *service.Service) (http.Resp, error) {
	return req.Do(ctx, s)
}

func (req *NormalCrossDomainReq) Do(ctx *gin.Context, s *service.Service) (resp http.Resp, err error) {
	var data NormalCrossDomainResp

	front.HUB.OnlineMsgPool <- front.Message{Data: "NormalCrossDomainReq 接受到请求"}

	resp.SetData(data)
	return
}
